package ${entity.packageName}.logic.gview.${entity.entityNameFirstLower};


import com.gonsin.gview.annotations.GView;
import com.gonsin.gview.annotations.actions.GAction;
import com.gonsin.gview.annotations.board.GBoard;
import com.gonsin.gview.annotations.board.GButton;
import com.gonsin.gview.annotations.board.form.*;
import com.gonsin.gview.annotations.data.*;
import com.gonsin.gview.annotations.enums.ButtonAction;
import ${entity.packageName}.bean.${entity.entityName}Bean;
import ${entity.packageName}.interfaces.I${entity.entityName}Service;
import ${entity.packageName}.po.${entity.entityName}Po;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

<#include "/gview/gview.ftl"/>
@Component
public class Update${entity.entityName}View {

    @Autowired private I${entity.entityName}Service seat${entity.entityName}Service;

    @GAction("update${entity.entityName}")
    @GDataChanged("search${entity.entityName}")
    public void update${entity.entityName}(String ${entity.entityNameFirstLower}Key, ${entity.entityName}Po bean){
        ${entity.entityName}Service.update${entity.entityName}(${entity.entityNameFirstLower}Key, bean);
    }

    @GDataSource("get${entity.entityName}")
    public ${entity.entityName}Bean get${entity.entityName}(String ${entity.entityNameFirstLower}Key){
        return ${entity.entityName}Service.get${entity.entityName}(${entity.entityNameFirstLower}Key);
    }

}
